//
// File:	Trace.hpp
// Author:	Thomas TISSOT-DUPONT
// Login:	<thomas.tissotdupont@free.fr>
//
// Create:	20/01/2010 at 21:52:34
// Purpose:	
//
#ifndef TRACE_HPP
#define TRACE_HPP

#include <map>
#include <string>
#include <iostream>
#include <iomanip>

namespace Trace
{
	class TraceStream : public std::ostream
	{
	public:
							TraceStream(const std::string &);
		void				operator!();

	private:
		std::string			_prefix;
	};

	//Trace Levels
	enum TraceLevels
	{
		None				= 0,
		Log					= (1 << 1),
		Debug				= (1 << 2),
		Warning				= (1 << 3),
		Error				= (1 << 4),
		All					= 0x7fffffff
	};

	//Trace Streams
	extern std::ostream		log;
	extern std::ostream		debug;
	extern std::ostream		warning;
	extern std::ostream		error;

	//Set Level
	void					setLevel(unsigned int);
};

#endif //!TRACE_HPP
